package demo.fori;

import javax.swing.*;
import java.util.List;

/**
 * 测试foreach
 *
 * @author sun.ye
 * @since 2020-05-17 10:37
 */
public class ForEach {


    public static void main(String[] args) throws Exception {

        int a ;
        System.out.println((a = 1 + 3));
        String[] ssss = {"1","2","2","3"};
        for (String ss : ssss) {
            try {
                if("2".equals(ss)){
                    throw new Exception();
                }
            }catch (Exception e){
                System.out.println("222222222222");
            }

        }
    }



}
